/*
 * @Author: lg9527 13691080728@126.com
 * @Date: 2024-04-22 16:45:01
 * @LastEditors: lg9527 13691080728@126.com
 * @LastEditTime: 2024-04-22 16:57:43
 * @FilePath: \cmjyxpcfront\src\router\routes\modules\demo\dangermanager.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// 房屋隐患管理
import type { AppRouteModule } from '/@/router/types';

import { getParentLayout, LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const charts: AppRouteModule = {
  path: '/dangermanager',
  name: 'dangermanager',
  component: LAYOUT,
  redirect: '/dangermanager/hcdanger',
  meta: {
    orderNo: 210,
    icon: 'ion:bar-chart-outline',
    title: t('routes.demo.dangermanager.root'),
    roles: ['Admin', 'City', 'Area', 'Street', 'Community', 'Investigator'],
    //  userGroups: ['Admin', 'FireControl', 'Housing', 'Police'],
    userGroups: ['FireControl'],
    hideChildrenInMenu: true,
  },
  children: [
    {
      path: 'hcdanger',
      name: 'hcdanger',
      meta: {
        title: t('routes.demo.dangermanager.root'),
        hideChildrenInMenu: true,
        roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
        userGroups: ['Admin', 'FireControl'],
      },
      component: () => import('/@/views/dangermanager/hcdanger/index.vue'),
      children: [
        {
          path: 'townYhStatic',
          name: 'townYhStatic',
          meta: {
            hideMenu: true,
            roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
            userGroups: ['Admin', 'FireControl'],
            title: '隐患信息（乡镇）',
          },
          component: () => import('/@/views/dangermanager/hcdanger/component/townYhStatic.vue'),
        },
        {
          path: 'villageYhStatic',
          name: 'villageYhStatic',
          meta: {
            hideMenu: false,
            roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
            userGroups: ['Admin', 'FireControl'],
            title: '隐患信息（乡镇）',
          },
          component: () => import('/@/views/dangermanager/hcdanger/component/villageYhStatic.vue'),
        },
      ],
    },
    {
      path: 'hourseYhDetailLog',
      name: 'hourseYhDetailLog',
      meta: {
        title: '',
        hideMenu: true,
        roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
        userGroups: ['FireControl'],
      },
      component: () => import('/@/views/dangermanager/hourseYhDetailLog.vue'),
    },
    {
      path: 'hourseCheckYhDetailLog',
      name: 'hourseCheckYhDetailLog',
      meta: {
        title: '',
        hideMenu: true,
        roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
        userGroups: ['FireControl'],
      },
      component: () => import('/@/views/dangermanager/hourseCheckYhDetailLog.vue'),
    },
  ],
};

export default charts;
